<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/13
 * Time: 23:55
 */

namespace app\index\controller;


use icontroller\admin\AController;
use logic\admin\index\LAccountWithdrawOrder;

class AccountWithdrawOrder extends AController
{
    private $logic;
    public function __construct()
    {
        parent::__construct();
        $this->logic=new LAccountWithdrawOrder();
    }

    public function index(){
        $status_id = input("status");
        if($status_id==2){
            $status = 2;
        }else{
            $status = 1;
        }
        $this->assign('status',$status);
        return view();
    }

    public function index_data(){
        $status=input('status');
        $param=array(
            'search'=>input('keyword'),
            'limit'=>input('limit'),
            'offset'=>input('offset'),
            'sort'=>input('sort'),
            'order'=>input('order'),
            'begindate' => input('begindate'),
            'enddate' => input('enddate'),
        );
        $data=$this->logic->logic_index_data($status,$param);
        return $data;
    }

    public function verify(){
        $id=input('id');
        $item=$this->logic->logic_verify($id);
        $this->assign('item',$item);
        return view();
    }

    public function verify_submit(){
        $id=input('id');
        return $this->logic->logic_verify_submit($id);
    }

    public function withdraw_cancel(){
        $params=array(
            'id'=>input('id'),
            'refuse_reason'=>input('refuse_reason')
        );
        return $this->logic->logic_withdrawl_cancel($params);

    }

}